package com.shf.entity;

import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;

/**
 * (Traveller)实体类
 *
 * @author makejava
 * @since 2023-10-11 11:28:31
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Alias("Traveller")
public class Traveller implements Serializable{


    private String id;

    private String name;

    private String sex;

    private String phoneNum;

    private Integer credentialsType;

    private String credentialsNum;

    private Integer travellerType;
   private  String  travellerTypeStr;

   private String credentialsTypeStr;

    public String getTravellerTypeStr() {

        if (travellerType == 0){
            travellerTypeStr ="成人";
        }else if (travellerType == 1){
            travellerTypeStr = "儿童";
        }
        return travellerTypeStr;
    }

    public String getCredentialsTypeStr() {

        if (credentialsType == 0){
            credentialsTypeStr ="身份证";
        }else if (credentialsType == 1 ){
            credentialsTypeStr = "护照";
        }else if (credentialsType == 2){
            credentialsTypeStr ="军官";
        }
        return credentialsTypeStr;
    }
}

